package com.jic.interaction.JDVOP.service;

import com.jic.interaction.JDVOP.common.utils.RestResult;
import com.jic.interaction.JDVOP.model.enyity.order.*;
import com.jic.interaction.JDVOP.model.vo.request.order.OrderDetailsRequest;
import com.jic.interaction.JDVOP.model.vo.request.order.OrderSubmitRequest;
import com.jic.interaction.JDVOP.model.vo.request.order.OrderWaybillInformation;
import com.jic.interaction.JDVOP.model.vo.response.order.CheckCalendarResponse;
import com.jic.interaction.JDVOP.model.vo.response.order.CheckNewOrderResponse;
import com.jic.interaction.JDVOP.model.vo.response.order.ConfirmInfoResponse;
import com.jic.interaction.JDVOP.model.vo.response.order.OrderSubmitResponse;

import java.lang.reflect.InvocationTargetException;

/**
 * @ClassName OrderService
 * TODO
 * @Description JD 订单接口
 * @Author chenhongfeng
 * @Date 2020/11/15 16:01
 * @Version 1.0
 **/
public interface OrderService {
    /**
     * 订单查询运费接口  查询准备提交的订单的运费
     * @param orderFreight
     * @return OrderFreight
     */
    String selectFreightService(OrderFreight orderFreight) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    /**
     * 查询预约日历
     * @param request
     * @return
     */
    public CheckCalendarResponse selectPromiseCalendar(CheckCalendar request);

    /**
     * 订单提交接口 提交订单信息，生成京东订单
     * @param submit
     * @return Result
     */
    OrderSubmit selectSubmitOrder(OrderSubmit submit);

    /**
     * 订单反查接口，根据第三方订单号反查京东的订单号
     *   @param request
     * @return String
     */
    String selectJdOrderIdByThirdOrderr(ContrastOrder request);

    /**
     * 确认预占库存订单接口
     * @param
     * @return Boolean
     */
    Boolean selectConfirmOrder(CampOnOrder result) ;
    /**
     * 取消未确认订单接口
     * @param  result
     * @param
     * @return Boolean
     */
    RestResult<Boolean> selectCancel(CancelOrder result) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    /**
     * 查询配送信息接口
     * @param result
     * @return OrderResult
     */
    RestResult<String> selectOrderTrack(OrderDelivery result) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    /**
     * 确认收货接口
     * 仅适用于厂商直送订单。厂商直送订单可使用此接口确认收货并将订单置为完成状态。
     * @param result
     * @return
     */
    RestResult<String> selectConfirmReceived(CancelOrder result) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    /**
     * 更新采购单号接口   更新订单上的PO单号，可选择用于配送单、发票等票面展示。
     * @param result
     * @return
     */
    Boolean selectSaveOrUpdatePoNo(OrderUpdateNumber result) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    /**
     * 查询新建订单列表接口 查询所有新建的订单列表。可用于核对订单
     * @param result
     * @return
     */
    CheckNewOrderResponse  listCheckNewOrder(CheckNewOrder result) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    /**
     * 查询妥投订单列表接口 查询所有妥投的订单列表。可用于核对订单。
     * @param result
     * @return
     */
    CheckNewOrderResponse  listCheckDlokOrder(CheckNewOrder result) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    /**
     * 查询拒收订单列表接口 查询所有拒收的订单列表。可用于核对订单。
     * @param result
     * @return
     */
    CheckNewOrderResponse listCheckRefuseOrder(CheckNewOrder result) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    /**
     * 查询完成订单列表
     * @param request
     * @return
     */
    CheckNewOrderResponse listCheckCompleteOrder (CheckNewOrder request) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    /**
     * 查询配送预计送达时间
     * @param request
     * @return
     */
   String selectPromiseTips ( OrderPromiseTips request);

    /**
     * 批量确认收货接口
     * @param request
     * @return
     */
    ConfirmInfoResponse selectBatchConfirmReceived (BatchOrder request);

    OrderSubmitResponse SubmitOrder(OrderSubmitRequest request);

    /*
    * 查询订单详情
    * */
    RestResult<String> selectOrderDetails(OrderDetailsRequest request) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    RestResult<String> updateSendInfo(OrderWaybillInformation param) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;
}
